macro SliceMovie;
{ Makes a movie of 1D slices of the top most 2D window }
var
	boolean : hasData;
	Str255 : name;
	longint : y,dx,dy;
begin
	DisposeUnClose;
	hasData:=FrontData(name,'data');
	if(!hasData) then
		ShowError('Error','There are no active data windows');
		exit;
	endif;
	GetDimensions(name,dx,dy);
	StartMovie('SliceMovie',300,200);
	for(y,1,dy)
		SliceData(name,1,y,dx,y,'Slice');
		SetWindowSize('Slice',300,200,FALSE);
		SetLabel('Slice','XLABEL','','Geneva',9,'PLAIN');
		SetLabel('Slice','ZLABEL','','Geneva',9,'PLAIN');
		SetLabel('Slice','TITLE','','Geneva',9,'PLAIN');
		MoviePlot('Slice','Line Plot');
		DisposeData('Slice');
	endfor;
	StopMovie;
end;
